<html>
<head>
  <link rel="stylesheet" media="screen" type="text/css" href="<?php echo $assetsURL; ?>style.css" />
  <style type='text/css'>
    ul.toc li {
      background-image: url(<?php echo $assetsURL; ?>bullet.gif);
    }
    ul.toc li.up {
      background-image: url(<?php echo $assetsURL; ?>caret_up.gif);
    }
    ul.toc li.home {
      background-image: url(<?php echo $assetsURL; ?>caret_home.gif);
    }
    ul.toc li.active {
      background-image: url(<?php echo $assetsURL; ?>bullet_active.gif);
    }
  
  </style>
  <script type="text/javascript" src="<?php echo $assetsURL; ?>highlight.js" ></script>
  <script language='JavaScript'>
  addLoadEvent(initCodeHashHighlight);
  </script>
  <title><?php echo $bookTitle.' :: '; ?><?php echo $curTitle; ?></title>
</head>
<body>
<table style='width: 100%'><tr><td  style="vertical-align: top;width: 150px">
<ul class='toc'>
<li class='home'><a href="<?php echo $rootURL; ?>">Top</a></li>
<?php if (count($upTitle)): ?>
<?php for($level=count($upTitle)-1;$level>=0;$level--): ?>
<li class='up'><a href="<?php echo str_repeat('../',$level).$upLevelLink; ?>"><?php echo $upTitle[$level]; ?></a></li>
<?php endfor; ?>
<?php endif; ?>
</ul>
<ul class='toc'>
<?php echo $menu; ?>
</ul>
</td><td  style="vertical-align: top">
<table style='width: 100%'><tr><td>
<?php 
if ($prev) echo "<a href='".$prev['href']."'>&laquo;".$prev['title']."</a>";
else echo '&nbsp;';
?>
</td><td style='text-align: right'>
<?php
if ($next) echo "<a href='".$next['href']."'>".$next['title']." &raquo;</a>";
else echo '&nbsp;';
?>
</td></tr></table>
<div style='margin-top: 20px'>
<h1><?php echo $curTitle; ?></h1>
<?php echo $content; ?>
</div>
</td></tr></table>
</body>
</html>
